%-------------------------------------------------------------------------;
% Figure 1: Interest Rates;
%-------------------------------------------------------------------------;

clear;
clc;
close all;

%Import data;

filename='Interest_rates_1996_2022';
[data,txt,raw]=xlsread(filename);

dates=txt(2:end,1);

%Interest rates;
Implied_rate=data(:,1)*100;
Zero_rate=data(:,2)*100;
Treasury_rate=data(:,3)*100;

figure(1)
plot(Implied_rate,'-','LineWidth',1)
hold on;
plot(Zero_rate,':','LineWidth',1)
hold on;
plot(Treasury_rate,'-.','LineWidth',1)
set(gca, 'XTick', 12:48:length(dates));
set(gca, 'XTickLabel', dates(12:48:length(dates)));
legend('Option-implied rate','Zero curve rate','Constant maturity treasury rate');
axis([1 length(data(:,1)) 0 8]);
ylabel('Annual interest rate in %')
set(gca,'FontSize',8)






